@primaryColor: #2080f0;
@successColor: #18a058;
@dangerColor: #d03050;
@warningColor: #f0a020;

.tagLighten(@color, @num, @num2) {
  border: 1px solid lighten(@color, @num);
  background-color: lighten(@color, @num2);
  color: @color;
}

.o-tag {
  .tagLighten(@primaryColor, 30, 42);
  display: inline-block;
  height: 28px;
  padding: 0 10px;
  line-height: 26px;
  font-size: 12px;
  border-radius: 4px;
  box-sizing: border-box;
  white-space: nowrap;

  .o-tag {
    margin-left: 10px;
  }

  .icon-close {
    font-size: 12px;
    width: 16px;
    height: 16px;
    display: inline-block;
    margin-left: 10px;
    transform: scale(.8);
    vertical-align: middle;
    line-height: 16px;
    cursor: pointer;

    &:hover {
      opacity: .6;
    }
  }

  &.tag-success {
    .tagLighten(@successColor, 30, 58);
  }

  &.tag-warning {
    .tagLighten(@warningColor, 10, 26);
  }

  &.tag-danger {
    .tagLighten(@dangerColor, 30, 46);
  }

  &.tag-large {
    height: 32px;
    line-height: 30px;
  }

  &.tag-small {
    height: 24px;
    line-height: 22px;
    padding: 0 8px;
  }

  &.tag-mini {
    height: 20px;
    line-height: 18px;
    padding: 0 5px;
  }
}